#include <windows.h>

PTCHAR * CommandLineToArgv(PTCHAR CmdLine, int* _argc);
LPVOID CALLBACK PatchCallBack( UINT Id, LPVOID Parm );

void MyPrintf(LPCSTR fmt, ...);
int InformError(LPCSTR msg, LPCSTR arg, UINT show=MB_ICONSTOP|MB_OK );

void MakeTable(unsigned char * enc_table, unsigned short salt);
void DoDecode(unsigned char * enc_table, unsigned char * buf, unsigned start, unsigned sz);
bool DoMcDecode(unsigned char  * buf, unsigned sz, bool encode);
bool GetReg();

extern const char DAT_CopyRight[50];
#define DAT_PACKED 0x100

#pragma pack(1)	
	struct VerInfo
	{
		char sign[50];//DAT_CopyRight
		WORD salt,pck;
		WORD day, vir1;
		char skip2[11];
		DWORD ver,reserv,vir2;
	};

//extern VerInfo Vi;
const unsigned int VerInfo_Plain=0x34;//(int)((unsigned char*)&Vi.pck-(unsigned char*)&Vi);
